from pydantic import BaseModel, HttpUrl
from typing import Optional, List
from datetime import datetime


class VideoUrlRequest(BaseModel):
    url: str

class VideoContentResponse(BaseModel):
    platform: str
    title: Optional[str] = None
    description: Optional[str] = None
    author: Optional[str] = None
    tags: Optional[List[str]] = None
    publish_time: Optional[str] = None
    
    class Config:
        from_attributes = True


class VideoContentCreate(BaseModel):
    url: str
    platform: str
    title: Optional[str] = None
    description: Optional[str] = None
    author: Optional[str] = None
    tags: Optional[str] = None  # JSON string
    publish_time: Optional[str] = None